package com.onairm.baselibrary.mvp.fragment;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.onairm.baselibrary.mvp.base.MvpCallback;
import com.onairm.baselibrary.mvp.base.MvpPresenter;
import com.onairm.baselibrary.mvp.base.MvpView;
import com.onairm.baselibrary.mvp.base.ProxyMvpCallback;

/**
 * Created by bqy on 2018/3/27.
 */

public class FragmentMvpDelegateImpl<V extends MvpView, P extends MvpPresenter<V>> implements FragmentDelegate<V, P>{

    private ProxyMvpCallback<V, P> proxyMvpCallback;

    public FragmentMvpDelegateImpl(MvpCallback<V, P> mvpCallback) {
        this.proxyMvpCallback = new ProxyMvpCallback<>(mvpCallback);
    }

    @Override
    public void onAttach(Context context) {

    }

    @Override
    public void onCreate(Bundle savedInstanceState) {

    }

    @Override
    public void onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        proxyMvpCallback.createPresenter();
        proxyMvpCallback.attachView();
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {

    }

    @Override
    public void onStart() {

    }

    @Override
    public void onResume() {

    }

    @Override
    public void onPause() {

    }

    @Override
    public void onStop() {

    }

    @Override
    public void onDestroyView() {
        proxyMvpCallback.detachView();
    }

    @Override
    public void onDestroy() {

    }

    @Override
    public void onDetach() {

    }


}
